<template>
<div>
  <el-carousel :interval="4000" type="card" height="400px">
    <el-carousel-item v-for="item in img" :key="item">
      <el-image
        style="width: 100%; height: 100%"
        :src="item"
        initial-index="0"
        autoplay
        interval="500">
      </el-image>
    </el-carousel-item>
  </el-carousel>
</div>
</template>

<script>
import img1 from "../assets/img/1.jpg";
import img2 from "../assets/img/2.jpg";
import img3 from "../assets/img/3.jpg";
import img4 from "../assets/img/4.jpg";
export default {
  name: "VueIndex",
  data(){
    return{
      img:[img1,img2,img3,img4]
    }
  }

}
</script>
<style scoped>

</style>
